package com.rain.bee.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.rain.bee.entity.User;
import com.rain.bee.feign.IMyFeignClient;

/**
 * feign
 *@Title:  
 *@Description:  
 *@Author: leaf  
 *@Since:2019年2月18日  
 *@Version:1.1.0
 */
@RestController
@RequestMapping("feign")
public class FeignController {

	@Autowired
	private IMyFeignClient feignClient;
	
	@GetMapping("{id}")
	public String test(@PathVariable String id) {
		return feignClient.test(id);
	}
	
	@GetMapping("test")
	public String test1() {
		User user = new User();
		
		user.setId(12);
		user.setName("lee");
		
		return feignClient.post(user);
	}
	
}
